package javaseof10day.day3.pm;

import java.util.ArrayList;
import java.util.List;

public class Action {
	
	

    private static List<String> list = new ArrayList<String>();
    static{
        
        list.add("骂人");
        list.add("sb");
        list.add("妈的");
        list.add("他妈的");

    }
    public static List<String> getlist(){
        return list;
    }
	
	
	

	public static String WordFilter(String word) {
		if (word == null || word == "") {
			return null;

		}
		
		
		
		
		List<String> list = Action.getlist();
		for (String str : list) {
			word = word.replaceAll(str, "***");
		}


		return word;
	}

}
